<!DOCTYPE html>
<html>
 <head> 
  <meta charset="UTF-8" /> 
  <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" /> 
  <title>登录</title> 
  <link rel="stylesheet" href="css/vince.css" /> 
 </head> 
 <body> 

 <div class="login">
 <div class="login_box">
 	<div class="input_box">
 		<p>
 			<img src="images/img_13.png" alt="">
 			<input type="text" placeholder="输入手机号码"  type="text" name="fphone">
 		</p>
 	</div>
 	<div class="input_box">
 		<p>
 			<img src="images/img_14.png" alt="">
 			<input type="password" placeholder="输入密码" type="password" name="wxpwd">
 		</p>
 	</div>
 	<div class="login_btn">
 		<input type="button" value="用户登录" onclick="login()">
 		<p>
 			<a href="#" class="left">忘记密码?</a>
 			<a href="#" class="right">注册</a>
 		</p>
 	</div>

 </div>
 	

 </div>







  <script src="js/jquery.js"></script> 
<script type="text/javascript">

function login(){
      var re =/^[1][3-9][0-9]{9}$/;
   alert(re.test($("input[name='fphone']").val()));
  if(re.test($("input[name='fphone']").val())){
     
    }
     else{      
        alert("请输入正确手机号！");$("input[name='fphone']")[0].focus();return false;
    }
    if($("input[name='wxpwd']").val()==""){    
        alert("请输入密码！");$("input[name='wxpwd']")[0].focus();return false;
    }   
    $.post("http://115.159.106.174:8080/vanoo/weixin/worker_login.do?token=123",{
    'fphone':$("input[name='fphone']").val(),
    'wxpwd':$("input[name='wxpwd']").val()
    },function(data){
      
          if(data.msg == "workerlogin"){
              
                window.location.href = "index.html";
            }else{
                  alert("您输入的用户名或密码有错！");$("input[name='fphone']")[0].focus();
                  return false;
            }
    },"json")

 
}
</script>
  <script src="js/vince.js"></script>   
 </body>
</html>